]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: Avoid setting GObject property to undefined instead of null
authorSebastian Keller <skeller@gnome.org>
Fri, 23 Apr 2021 14:10:52 +0000 (16:10 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 23 Apr 2021 15:21:56 +0000 (15:21 +0000)
The windowActor in the CyclerHighlight was set to undefined if
this._window was null. This was causing an error when trying to set it
as a property.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4167

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1820>

js/ui/altTab.js

index 3ecadad86861fb02905784b14343548c85657a10..2ae7b6b23230b7f87015ca56ca82eb19d460b647 100644 (file)
@@ -427,7 +427,7 @@ class CyclerHighlight extends St.Widget {
         if (this._clone.source)
             this._clone.source.sync_visibility();
 
-        const windowActor = this._window?.get_compositor_private();
+        const windowActor = this._window?.get_compositor_private() ?? null;
 
         if (windowActor)
             windowActor.hide();